﻿using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.ComponentModel;
using System.Linq;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using Microsoft.Phone.Controls;
using PhoneAppRssReader.Entity;

namespace PhoneAppRssReader
{
    public partial class PivotPage1 : INotifyPropertyChanged
    {
        private ObservableCollection<FeedItem> _feedItems;
        public ObservableCollection<FeedItem> FeedItems
        {
            get { return _feedItems; }
            set
            {
                _feedItems = value; OnPropertyChanged("FeedItems");
            }
        }

        public PivotPage1()
        {
            InitializeComponent();
            DataContext = App.FeedData;
            //Loaded += (sender, e) => App.FeedData.GetFeedItems(new Uri("http://tinhte.vn/rss", UriKind.RelativeOrAbsolute));

        }

        #region Implementation of INotifyPropertyChanged

        public event PropertyChangedEventHandler PropertyChanged;
        private void OnPropertyChanged(string info)
        {
            if (PropertyChanged != null)
            {
                PropertyChanged(this, new PropertyChangedEventArgs(info));
            }
        }

        #endregion
    }
}